<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        #t1{
            width: 600px;
            height:300px;
            background: orange;
        }
        #t2{
            width: 600px;
            height: 300px;
            background: red;
        }
    </style>
</head>
<body>
<div id="t1" contenteditable="true"></div>
<div id="t2"></div>
<script src="js/jquery.min.js"></script>
<script>
    $(function(){

        $('#t1').on('keyup',function(){
            $(this).keypress(function(e){
                if(e.keyCode==13){
                    $(this).append('<br>');
                }
            });


            $('#t2').html(
                    $('#t1').html() + $('#t1').val()
            );




        });
    });
</script>
</body>
</html>